﻿var _contentID,_value;

function AddFeedback(contentID, value,memberNo)
{
_contentID = contentID;
_value = value;
if(!$('td_feedback_' + contentID).disabled)
    WebServices.WWW.Translate.AddFeedback(contentID, value, memberNo, onAddFeedbackCallback);
}

function onAddFeedbackCallback(result)
{
    var feedback = parseInt($('div_feedback_' + _contentID).innerHTML);
    if (result > 0) $('div_feedback_' + _contentID).innerHTML = _value;
}

function OnSubmit()
{
    if($('texta_content').value.length <= 0)
    {
        $('span_inputerror').innerHTML = 'enter some characters here!';
        return false;
    }
    
    if ($('texta_content').value.length > 1000) {
        $('span_inputerror').innerHTML = 'text length must be less than 1000!';
        return false;
    }
    
    return true;
}